<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/templates/padrao.xhtml">
    <ui:define name="page">
        <ui:insert name="formGrowl">
            <p:growl id="growl" life="10000" />
        </ui:insert>
        <ui:insert name="confirmationDialog">
        </ui:insert>
        <h:form id="formCad">
            <ui:insert name="formMessages">
                <p:messages id="formMessages" />
            </ui:insert>
            <p:panel id="panelCadastro" header="#{pPageTitle}" style="border:0px">
                <p:focus/>                
                <ui:insert name="buttons">
                    <p:commandButton icon="ui-icon-extlink" accesskey="l" id="listar" immediate="true" ajax="false" action="#{pManagedBean.actionListar}" value="${label['btnListar.label']}"/>
                    <p:tooltip for="listar">#{label['btnListar.tooltip']}</p:tooltip>
                    <p:spacer width="5"/>
                    <p:commandButton icon="ui-icon-disk" accesskey="s" id="salvar" action="#{pManagedBean.actionSalvar}" value="#{label['btnSalvar.label']}" update=":formCad"/>
                    <p:tooltip for="salvar">#{label['btnSalvar.tooltip']}</p:tooltip>
                </ui:insert>                
                <br/>
                <br/>
                <h:outputText value="Os campos com ( * ) são de preenchimento obrigatório" style="color: red"/>
                <br/>
                <br/>
                <h:panelGrid id="panelFields" columns="2" columnClasses="textAlignRight,textAlignLeft">
                    <ui:insert name="pageBody"></ui:insert>
                </h:panelGrid>
            </p:panel>
        </h:form>
    </ui:define>
</ui:composition>
